package tools;

public class DataPoint implements Comparable<Object> {
	public double x;

	public double y;

	public double getX() {
		return x;
	}

	public void setX(double x) {
		this.x = x;
	}

	public double getY() {
		return y;
	}

	public void setY(double y) {
		this.y = y;
	}

	public DataPoint(double x, double y) {
		this.x = x;
		this.y = y;
	}

	@Override
	public int compareTo(Object o) {
		DataPoint dp2 = (DataPoint)o;
		double x2 = dp2.getX();
		return new Double(this.x).compareTo(new Double(x2));
	}
}
